#include "stdafx.h"
#include "image.h"

uint_8 * image_get_line(const image_data_t * img, uint_32 line)
{
	return img->buffer + img->pitch * line;
}

void image_data_clear(image_data_t * img, uint_8 val)
{
	image_clear_ex(img->buffer, img->length, val);
}

void image_attach(image_data_t * img, uint_8 * buffer, uint_32 length, color_mode_e color_mode,
	uint_32 width, uint_32 height, 
	uint_32 pitch, uint_32 bits)
{
	img->buffer = buffer;
	img->length = length;
	img->color_mode = color_mode;
	img->width = width;
	img->height = height;
	img->pitch = pitch;
	img->bits = bits;
}